package com.ruoyi.tea.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.tea.mapper.TeaRecoringMapper;
import com.ruoyi.tea.domain.TeaRecoring;
import com.ruoyi.tea.service.ITeaRecoringService;
import com.ruoyi.common.core.text.Convert;

/**
 * 录播记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-07-31
 */
@Service
public class TeaRecoringServiceImpl implements ITeaRecoringService 
{
    @Autowired
    private TeaRecoringMapper teaRecoringMapper;

    /**
     * 查询录播记录
     * 
     * @param id 录播记录主键
     * @return 录播记录
     */
    @Override
    public TeaRecoring selectTeaRecoringById(Long id)
    {
        return teaRecoringMapper.selectTeaRecoringById(id);
    }

    @Override
    public TeaRecoring selectTeaRecoringApiById(TeaRecoring teaRecoring) {
        return teaRecoringMapper.selectTeaRecoringApiById(teaRecoring);
    }

    /**
     * 查询录播记录列表
     * 
     * @param teaRecoring 录播记录
     * @return 录播记录
     */
    @Override
    public List<TeaRecoring> selectTeaRecoringList(TeaRecoring teaRecoring)
    {
        return teaRecoringMapper.selectTeaRecoringList(teaRecoring);
    }

    /**
     * 新增录播记录
     * 
     * @param teaRecoring 录播记录
     * @return 结果
     */
    @Override
    public int insertTeaRecoring(TeaRecoring teaRecoring)
    {
        teaRecoring.setCreateTime(DateUtils.getNowDate());
        return teaRecoringMapper.insertTeaRecoring(teaRecoring);
    }

    /**
     * 修改录播记录
     * 
     * @param teaRecoring 录播记录
     * @return 结果
     */
    @Override
    public int updateTeaRecoring(TeaRecoring teaRecoring)
    {
        return teaRecoringMapper.updateTeaRecoring(teaRecoring);
    }

    /**
     * 批量删除录播记录
     * 
     * @param ids 需要删除的录播记录主键
     * @return 结果
     */
    @Override
    public int deleteTeaRecoringByIds(String ids)
    {
        return teaRecoringMapper.deleteTeaRecoringByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除录播记录信息
     * 
     * @param id 录播记录主键
     * @return 结果
     */
    @Override
    public int deleteTeaRecoringById(Long id)
    {
        return teaRecoringMapper.deleteTeaRecoringById(id);
    }

    @Override
    public int seeNumber(TeaRecoring teaRecoring) {
        return teaRecoringMapper.seeNumber(teaRecoring);
    }
}
